<div class="layui-card">
  <div class="layui-card-body">
    <div id="table_registry"></div>
    <script type="text/html" id="tpl_status">
      {{d.status.description}}
    </script>
  </div>
</div>
<script type="text/html" template lay-done="layui.data.done(d.params)"></script>

<script>
  layui.data.done = function (query) {
    layui.use(['table'], function () {
      let $ = layui.$
        , table = layui.table

      let resourceUrl = 'admin/registries';

      // 列表查询
      table.render({
        elem: '#table_registry'
        , url: resourceUrl
        , where: query
        , page: true
        , cols: [[
          {title: 'ID', field: 'id', width: 80, align: "center"}
          , {title: '作品名称', field: 'product_name', minWidth: 100}
          , {title: '作品类别', field: 'product_cat', width: 100}
          , {title: '费用', field: 'display_pay_amount', width: 100, align: "center"}
          , {title: '添加时间', field: 'created_at', width: 180, align: "center"}
          , {title: '状态', templet: '#tpl_status', width: 100, align: "center"}
        ]]
      });
    })
  }
</script>

